package deviceinfo.wsm.com.deviceinfo.net;

import java.util.LinkedHashMap;

import deviceinfo.wsm.com.deviceinfo.WsmDeviceInfoSDK;
import deviceinfo.wsm.com.deviceinfo.ip.IpAddressInfoUtils;
import deviceinfo.wsm.com.deviceinfo.plugin.com.an.deviceinfo.device.model.Network;
import deviceinfo.wsm.com.deviceinfo.sim.SimInfoUtils;

/**
 * Created by 王家宝 on 2018/7/9.
 * TEL:18241150668
 * MAIL:639586819@qq.com
 */

public class NetInfoUtils {

    public static LinkedHashMap<String, String> getAll() {
        Network network = new Network(WsmDeviceInfoSDK.getWsmSDK().getAppContext());
        LinkedHashMap<String, String> data = SimInfoUtils.getAll();
        data.put("IMEI", network.getIMEI());
        data.put("NetworkType", network.getNetworkType());
        data.put("NetworkClass", network.getNetworkClass());
        data.put("NetworkAvailable", network.isNetworkAvailable() + "");
        data.put("WifiEnabled", network.isWifiEnabled() + "");
        data.put("NfcEnabled", network.isNfcEnabled() + "");
        data.put("NfcPresent", network.isNfcPresent() + "");
        data.put("IP", IpAddressInfoUtils.getIp(WsmDeviceInfoSDK.getWsmSDK().getAppContext()));

        return data;
    }
}
